// components/gkBottomDialog/gkBottomDlg.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        frameTitle: {
            type: String,
            value: '标题',
          }
    },

    /**
     * 组件的初始数据
     */
    data: {
        flag:false,
        wrapAnimate:'wrapAnimate',
        bgOpacity:0,
        frameAnimate:'frameAnimate',
    },

    /**
     * 组件的方法列表
     */
    methods: {
        showFrame() {
            this.setData({ flag: true, wrapAnimate: 'wrapAnimate', frameAnimate: 'frameAnimate' });
          },
          hideFrame(e) {
            const that= this;
            that.setData({ wrapAnimate: 'wrapAnimateOut', frameAnimate: 'frameAnimateOut' });
            setTimeout(()=>{
              that.setData({ flag: false})
            },400);
          },
          onCancle(e){
            this.hideFrame(e);
            this.triggerEvent('myCancel');
          },
          
          onConfirm(e){
            this.hideFrame(e);
            this.triggerEvent('myConfirm');
          },
          catchNone(){
            //阻止冒泡
          },
          _showEvent() {
            this.triggerEvent("showEvent");
          },
          _hideEvent() {
            this.triggerEvent("hideEvent");
          }
    }
})
